Olivier Dion <olivier.d...@polymtl.ca> writes: > On Wed, 02 Mar 2022, Blake Shaw <bl...@nonconstructivism.com> wrote: > >> Next week I will start working on my installation /Scribble Jam/ for >> iLight Singapore[2], and I'm planning to do it all in Guile OpenGL + >> GLSL. I've started fiddling with Guile OpenGL and it seems pretty >> complete and performant (I haven't experienced any GC hiccups from the >> small stress tests I've put it through, but its still only minor >> stuff). > >> There is still a chance I might choose to create a Guile >> interface to a subset of the C++ OpenFrameworks[3] library > > FFI for C++ is a real pain to do. You can't juste use plain Scheme (at > least I don't know how for C++). If you go that route, I have C++ > templates that can help you for the glue between Scheme and C++ > (e.g. std::vector, std::map, std::string).
Thanks for this heads up, I've been curious about the C++ FFI experience in Guile (while less excited about actually getting into the weeds). If I go this route, I'll probably wind up approaching it from using libguile, adding a guile interpreter as an abstraction layer over the creative coding I'm doing in C++, as my experience with that has so far been pretty straight forward (in pure C). But I also worry that if I go down this route, out of habit and familiarity I'll for the most part just end up doing the whole thing in C++, with Guile acting as more of a sort of controller for livecoding. Which could end up really great! I'll be putting a couple days aside this coming week to take it for a test drive with old projects to see how it feels. But after some hacking tonight I'm feeling pretty excited about the pure-Scheme route, so if it appears feasible after weighing my options it will certainly be the direction I head in. > >> Also, one last thing, I'm considering attempting to create a DSL that >> compiles to a subset of GLSL like Chicken's GLLS library[4], as I'm >> becoming more and more interested in compilation. I remember reading >> somewhere about a Guile library that allows you to write C in Guile, > > I think you are refering to > <http://sph.mn/computer/guides/c/c-indent.html>. > Yes! thank you so much, this is it. And looking through the code base I can see there are already some pieces there that seem to illustrate how to work out formatting issues I was confused by as a newcomer to srfi-159 (which is amazing, I might add for folks searching the archive. go check it out ASAP:). I've also come across srfi-166, which is Alex Shinn (same author)'s monadic formatting procedure that deprecates fmt/srfi-159 in order to improve accuracy and safety, which apparently caused some minor headaches in glls. so I'll probably be porting srfi-166 to guile as well :) I've actually gone ahead and started porting GLLS to Guile and to my astonishment its been a piece of cake so far. If I keep up this pace I could even have a working prototyp by the end of the weekend -- but that just seems to good to be true (am I finally acquiring the famed lisp super powers? tbd) > There's also <https://www.nongnu.org/nyacc/> that can be helpful if > you're familiar with LALR(1) parsers. > > Regards, > old yes! nyacc has been extremely helpful. great software, my thanks to the authors, I was even able to use it to wrap glValidateProgram, which seems to be fine "out of the box", so to speek. thanks! b -- “In girum imus nocte et consumimur igni”