top | item 46589201

(no title)

james_a_craig | 1 month ago

"Please write me a program in Common LISP (SBCL is installed) which will render a simple "hello world" triangle in OpenGL. You should use only OpenGL and GLFW (using sbcl's FFI) for this, not any other existing 3D graphics framework."

This worked in codex-cli, albeit it took three rounds of passing back the errors. https://gist.github.com/jamesacraig/9ae0e5ed8ebae3e7fe157f67... has the resulting code.

discuss

order

f1shy|1 month ago

That is using sb-alien and sb-sys, which basically is no common lisp anymore. That is basically sbcl. I didn’t get anything in that direction (my prompt said nothing about a CL implementation) but I would have rejected it. I just wanted to see glfw and opengl in the :use clause. I have to do something that has to work in Mac, Linux and Windows, with at least ECL, sbcl and ccl.

james_a_craig|1 month ago

Yeah, I was just trying to keep to the letter of what you'd said - you asked for it just to use OpenGL/GLFW bindings, not other libraries, so I didn't want to install cl-opengl and cl-glfw, and told it just to use its own FFI.