gendl

2025-06-22

The Gendl® gendl Subsystem

Upstream URL

gitlab.common-lisp.net/gendl/gendl

Author

Genworks International

License

Affero Gnu Public License (http://www.gnu.org/licenses/)
README

Gendl - GENeral-purpose Declarative Language

Unlocking the power of Knowledge-Based Engineering for the modern era

Overview

὎6 Quick Start with Docker

Get up and running with Gendl in minutes:

  1. Clone this repository: git clone https://gitlab.common-lisp.net/gendl/gendl.git
  2. Navigate to the repository: cd gendl
  3. Start the Gendl container: ./docker/run
  4. Connect with Emacs: M-x slime-connect RET 5200 RET (or whatever swank host port is printed)
  5. Start Gendl services: Enter (gendl:start-gendl!) in the REPL
  6. Open your browser to http://localhost:9081/geysr

That's it! You're ready to start exploring Gendl's capabilities.

See the Docker section below for more details on running Gendl in Docker.

Gendl® is a Generative Programming and Knowledge Based Engineering framework, implementing concepts which date back to the 1980s and which cutting-edge companies have been quietly using to gain competitive advantage with mission-critical engineering applications. These concepts required hundreds of thousands of dollars investment in hardware and software just a couple decades ago. They are now at your fingertips as an integral part of the Open-Source ecosystem, running on commodity consumer-grade hardware.

Gendl allows for high-level declarative, object-oriented problem solving and application development, including but not limited to the ability to generate and manipulate 3D geometry. To solve a problem in Gendl, you formulate it using the define-object operator, which allows you to specify inputs, outputs (computed-slots), and child objects, which then gives the ability to generate a "tree" of objects, useful for decomposing complexity.

A graphical web-based interface, geysr, is available for interacting with your system as it is developed.

The web-based GUI framework used to make geysr (GWL) is also available for creating your own custom web-based user interfaces.

✨ Fundamental KBE Features

  • Declarative (non-procedural) Syntax - Express WHAT you want, not HOW to get it
  • Object and Value Caching - Automatic runtime memorization for performance
  • Dependency-Tracking - Values get recomputed only when their inputs change
  • Object-Oriented Design - Model complex systems as hierarchies of objects
  • Automatic UI Generation - Create interactive interfaces from your object models

Gendl ships with a full set of wireframe 3D and 2D geometry primitives along with output lenses for standard browser-based viewing and exchange formats such as PDF, SVG, X3D, PNG, as well as DXF.

Optionally there is available a set of surface- and solid-modeling primitives which currently depend on SMLib, a commercial geometry kernel available from Solid Modeling Solutions, Inc. SMLib enables the use of standard CAD data exchange formats such as Iges, STEP, and STL (for 3D printing).

Basic Requirements:

  1. Common Lisp: Allegro CL, LispWorks, CCL (Clozure CL), or SBCL. Without web interface, initial ports to ECL, ABCL, and CLISP have also been completed.

  2. Quicklisp (available from http://www.quicklisp.org)

  3. Gnu Emacs (recommended Editor/IDE -- native CL Editor/IDEs can also be used)

  4. Standard Web Browser. Pick one with WebGL support if possible (check here and here to check for WebGL browser support)

  5. Curiosity, Creativity, and Courage

Installation

To load the entire system, you can do it with:

  (ql:quickload :gendl)
  (gendl:start-gendl!)
  (gwl:announce-server-port) ;; if unsure of port numbers

Now you can do a quick sanity check by visiting:

http://localhost:9080/geysr

in your browser, and trying to instantiate the default assembly tree (robot) with File -> New [robot:assembly].

(adjust port numbers based on output from (gwl:announce-server-port))

Emacs Editor/IDE Support

Slime (Superior Lisp Interaction Mode for Emacs) is recommended for developing Gendl applications with Emacs.

Slime is available by doing M-x load-file [ret] in emacs, and selecting the file gdl/emacs/gdl.el.

`Glime' is our Gendl-specific customizations to Slime (still experimental). This is implemented both on the swank (Common Lisp) side of things, and on the slime (emacs) side of things, and can be loaded with

 (load (compile-file ".../gendl/emacs/glime.lisp"))

in CL, and


  M-x load-file [Ret]  .../gendl/emacs/glime.el
  

on the emacs side.

Although not strictly necessary, the file .../gendl/emacs/gdl.el is also provided and can be used as a starting point or reference for loading Glime and Gendl into an emacs environment.

Docker Continuous Integration Builds

The Continuous Integration for this repository at the common-lisp.net gitlab is building docker images for each branch whenever code is pushed. These images are registered with Docker Hub.

Here are instructions which assume you have emacs but not yet Slime:

  1. Install Gnu emacs on your host if it's not already.

  2. In Emacs, do M-x load-file [Enter] and specify gendl/emacs/gdl.el to be loaded. This should set up your emacs with Slime (needed to connect to the Gendl swank listener coming in the next step). (if you already have Slime loaded into your emacs environment, then this step may not be needed).

  3. Invoke the gendl/docker/run script in this repository. This will spin up a pre-built Gendl image based on CCL (Clozure CL), with Swank listening on port 5200 mapped to port 4200 on your docker host. At this point, you can do M-x slime-connect and connect to localhost on port 5200, and you'll be connected and ready to start developing with Gendl! (do (gendl:start-gendl!) to initiate services).

    If you have a ~/genworks/ on your host, this will be mounted and linked as /home/gendl-user/genworks/ in the container. You can further make symbolic links in the container to your liking, for example if you have a /home/samiam on your host you might do:

    docker exec -d $cid ln -s /home/gendl-user /home/samiam

    and then your host emacs and the Gendl container will both see the same files under /home/samiam so for example C-c C-k will work as expected in Slime..

Further Documentation

Also, more detail on operating the emacs environment can be found in gdl/emacs/README.txt.

Support/Community

  • Issues list at https://gitlab.common-lisp.net/gendl/gendl/-/issues (preferred)
  • #gendl on libera.chat (irc://irc.libera.chat/gendl)
  • @gendl and @genworks on X
  • (common-lisp.net mailing list hopefully/possibly coming soon)
  • #commonlisp, #common-lisp.net, #quicklisp, #emacs channels on irc.libera.chat

Training/Coaching

  • Genworks would like to begin hosting free Gendl/GDL training seminars in Metro Detroit and possibly other locations. Please contact Genworks if you are interested in being notified of any upcoming seminars.

Gendl source code Architecture:

Gendl is separated into layered components, some of which depend on others. Some components also depend on third-party external libraries, which are currently handled with the Quicklisp system.

At the core "kernel" is the :gendl (nickname :gdl) package, implemented with files in the folder gendl/base/. This includes the compiler/expanders for define-object and related macros as well as core primitives such as vanilla-mixin.

Including the base, there are eight modules supported with Gendl:

  • :base - (gendl/base/) Gendl language kernel for compiling declarative object definitions and working with them at runtime.

  • :cl-lite - (gendl/cl-lite/) For compiling and loading directory trees as projects. This can also generate ASDF files, and supplements the standard use of asdf and quicklisp.

  • :geom-base - (gendl/geom-base/) Built-in Gendl 3D and 2D wireframe primitives and cartesian coordinate system for basic geometry generation and manipulation.

  • :gwl - (gendl/gwl/) Generative Web Language, for representing web pages using GDL objects, includes Ajax-based web interaction with your model.

  • :gwl-graphics - (gendl/gwl-graphics/) for including graphics rendered from geometry object in GWL web pages.

  • :surf - (gendl/surf/) NURBS surface and brep/boolean solids primitives (these don't do much without the underlying geometry kernel middleware or implementation).

  • :geysr - (gendl/apps/geysr/) web-based testing, tracking, and debugging utility.

  • :yadd - (gendl/apps/yadd/) for self auto-documentation.

  • :regression - (gdl/regression) regression test utilities and tests.

Alternative Geometry Kernels

If you have a different favorite solid modeling kernel, then an interesting project would be to interface the existing Surface package to that kernel, by implementing the methods in surf/source/methods.lisp.

The Surface (:surf) package (in the surf/ folder) contains all the high-level Surface and Solid modeling primitives currently implemented in Gendl. These primitives provide a protocol for what the objects should be able to do (i.e. what messages they should answer), but without the SMLib library and associated middleware available, they will not be able to return any results. The SMLib kernel and associated middleware are available as part of the commercial Genworks® GDL product from Genworks® International.

AI Integration with Claude

Gendl now offers integration with AI assistants such as Claude Desktop through the Lisply MCP adapter. This powerful connection allows you to:

  • Leverage AI to help solve complex engineering problems
  • Have Claude write and test GDL code for you
  • Have Claude compile & load GDL code for you
  • Query the Gendl knowledge base for documentation and examples
  • Create a seamless workflow between natural language and generative design

The Lisply MCP adapter is available at github.com/gornskew/lisply-mcp replete with instructions for integrating with e.g. Claude Desktop.

For reference, the Gendl Lisply backend is by default built into Gendl as of this version, and its implementation can be found here.

License

Affero Gnu General Public License.

The AGPL, has the requirement that you release any derivatives and any applications compiled with Gendl under AGPL-compatible license (if distributed at all).

Proprietary Distribution

For proprietary (closed-source) development and distribution, the commercial Genworks® GDL system (including Gendl® technology, commercial CL engines, technical support, and commercial solid modeling engine) is available from Genworks.

Genworks offers an "AGPL escape clause" for applications which need to keep closed-source code, in the form of a 5% self-reported quarterly royalty. More information and payment gateway for this option will be available at payments.genworks.com.

Contributing

Genworks may offer AGPL license exception credits or other incentives as consideration for code contributions (e.g. bugfixes, ports) made via gitlab merge requests, under the terms of our Contributor's Agreement. Please contact Genworks for details.

Dependencies (5)

  • alexandria
  • cl-pdf
  • cl-typesetting
  • cl-who
  • uiop

Dependents (0)

    • GitHub
    • Quicklisp